package com.xiaoq.positionmarket.service.impl;

import com.xiaoq.positionmarket.entity.UserTrackEntity;
import com.xiaoq.positionmarket.repository.IUserTrackRepository;
import com.xiaoq.positionmarket.service.IUserTrackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by chenjh on 2018/4/8.
 */
@Service
public class UserTrackServiceImpl implements IUserTrackService {

    @Autowired
    private IUserTrackRepository userTrackRepository;

    @Override
    public boolean save(UserTrackEntity userTrackEntity) {
        return userTrackRepository.save(userTrackEntity);
    }

    @Override
    public List<UserTrackEntity> getUserTrackList(double longitude, double latitude, long maxDistance, Long startTime, Long endTime) {
        return userTrackRepository.getUserTrackList(longitude, latitude, maxDistance, startTime, endTime);
    }
}
